FROM python:3.9.0

WORKDIR /usr/src/app
ADD python/app/* /usr/src/app/


RUN touch /var/run/supervisor.sock
RUN chmod 777 /var/run/supervisor.sock
RUN chmod +x /usr/src/app/build.sh
RUN mkdir /var/log/supervisor
RUN /usr/local/bin/pip3 install -i https://pypi.douban.com/simple/ -r requirements.txt
ADD python/app/data/* /usr/local/lib/python3.9/site-packages/synonyms/data/
ADD python/app/supervisor/* /etc/supervisor/


CMD ["/bin/bash", "/usr/src/app/build.sh"]

